package com.cloud.feignconsumer.config;

import com.cloud.feignconsumer.service.NonRegisterService;
import feign.Feign;
import feign.Request;
import feign.Retryer;
import feign.codec.StringDecoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author kangwen
 */
@Configuration
public class FeignConfig {
	@Bean
	public NonRegisterService nonRegisterService() {
		return Feign.builder().decoder(new StringDecoder()).options(new Request.Options())
				.retryer(new Retryer.Default()).target(NonRegisterService.class, "http://localhost:8300");
	}
}
